﻿using Core.IPresentation;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Web;

namespace Presentation
{
    public class CultureCookieService : ICultureCookieService
    {
        const string COOKIE_NAME = "culture";       

        ICookieStorageService cookieStorage;
        public CultureCookieService(ICookieStorageService CookieStorageService)
        {
            this.cookieStorage  = CookieStorageService;
        }

        public string Get()
        {            
            return cookieStorage.Retrieve(COOKIE_NAME);            
        }

        public void Save(string culture)
        {                
            cookieStorage.Save(COOKIE_NAME, culture);        
        }
    }
}
